package com.ctsi.uaa.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;

/**
 * @version 1.0
 * @author: wang xiao xiang
 * @date: 2022/6/23 10:03
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class AuthCallback implements Serializable {
    private String code;
    private String authCode;
    private String state;
    private String authorizationCode;
    private String oauthToken;
    private String oauthVerifier;

    public static AuthCallbackBuilder builder() {
        return new AuthCallbackBuilder();
    }

    public String getCode() {
        return this.code;
    }

    public String getAuth_code() {
        return this.authCode;
    }

    public String getState() {
        return this.state;
    }

    public String getAuthorization_code() {
        return this.authorizationCode;
    }

    public String getOauth_token() {
        return this.oauthToken;
    }

    public String getOauth_verifier() {
        return this.oauthVerifier;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setAuth_code(String auth_code) {
        this.authCode = auth_code;
    }

    public void setState(String state) {
        this.state = state;
    }

    public void setAuthorization_code(String authorization_code) {
        this.authorizationCode = authorization_code;
    }

    public void setOauth_token(String oauth_token) {
        this.oauthToken = oauth_token;
    }

    public void setOauth_verifier(String oauth_verifier) {
        this.oauthVerifier = oauth_verifier;
    }

    public AuthCallback(String code, String auth_code, String state, String authorization_code, String oauth_token, String oauth_verifier) {
        this.code = code;
        this.authCode = auth_code;
        this.state = state;
        this.authorizationCode = authorization_code;
        this.oauthToken = oauth_token;
        this.oauthVerifier = oauth_verifier;
    }

    public AuthCallback() {
    }

    public static class AuthCallbackBuilder {
        private String codeParam;
        private String authCode;
        private String stateParam;
        private String authorizationCode;
        private String oauthToken;
        private String oauthVerifier;

        AuthCallbackBuilder() {
        }

        public AuthCallbackBuilder code(String code) {
            this.codeParam = code;
            return this;
        }

        public AuthCallbackBuilder auth_code(String auth_code) {
            this.authCode = auth_code;
            return this;
        }

        public AuthCallbackBuilder state(String state) {
            this.stateParam = state;
            return this;
        }

        public AuthCallbackBuilder authorization_code(String authorization_code) {
            this.authorizationCode = authorization_code;
            return this;
        }

        public AuthCallbackBuilder oauth_token(String oauth_token) {
            this.oauthToken = oauth_token;
            return this;
        }

        public AuthCallbackBuilder oauth_verifier(String oauth_verifier) {
            this.oauthVerifier = oauth_verifier;
            return this;
        }

        public AuthCallback build() {
            return new AuthCallback(this.codeParam, this.authCode, this.stateParam, this.authorizationCode, this.oauthToken, this.oauthVerifier);
        }

        @Override
        public String toString() {
            return "AuthCallback.AuthCallbackBuilder(code=" + this.codeParam + ", auth_code=" + this.authCode + ", state=" + this.stateParam + ", authorization_code=" + this.authorizationCode + ", oauth_token=" + this.oauthToken + ", oauth_verifier=" + this.oauthVerifier + ")";
        }
    }
}
